Migrating from Macromedia Flash MX to Flash MX 2004
Table of Contents
- Introduction
- ActionScript in Flash MX and Flash MX 2004
- Components in Flash MX and Flash MX 2004
- Video in Flash MX and Flash MX 2004
- Data Integration in Flash MX and Flash MX 2004
- Authoring Environment Changes in Flash MX 2004
- Screens in Flash MX Professional 2004
- Flash Player 7 Enhancements and Changes
Screens in Flash MX Professional 2004
Flash developers and designers have often used frames in the Timeline to define application "states," or slides, in a linear presentation. While this authoring technique may be familiar to experienced Flash developers, it can make creating and maintaining complex applications difficult—for experienced and new users alike.
Screens in Flash MX Professional 2004 provide high-level containers for creating applications. With screens, you can structure complex applications in Flash without using multiple frames and layers on the main Timeline. In fact, you can create a complex application without viewing the main Timeline at all.
Create screen-based documents of two different types: a Flash slide presentation suitable for sequential content (such as a slide show or multimedia presentation) or a Flash form application ideal for nonlinear, form-based applications, including Rich Internet Applications.
When you work with a screen-based document, the Screen Outline pane at the left of the Document window displays thumbnails of each screen in the current document in a collapsible tree view (see Figure 4). The tree represents the structural hierarchy of the document. Nested screens are indented below the screen that contains them.
Figure 4. Example of a form application
The screenshot above illustrates a form application built with screens. In this case, the application uses three forms to contain each of three application states: a login form (shown below), a shopping cart form, and a check out form.
Using ActionScript and Behaviors with Screens
Screens are similar to nested movie clips in the way they interact with ActionScript. (See Nested Movie Clips in the Using Flash Guide.) When you select a screen in the Screen Outline pane and add ActionScript, the script is added directly to the screen as an object action (much as ActionScript is added directly to a movie clip). It's usually best to use object actions for simple code (such as creating navigation between screens) and external AS files for more complex code.
Extending the Form and Slide Classes
Forms and slides—the two types of screens in Flash Professional—are
represented at runtime by the Form class (mx.screens.Form)
and Slide class (mx.screens.Slide), respectively. The
runtime class associated with a form or slide is determined by the
Class Name setting in the Property inspector (see Figure 5)
Figure 5. Determining the Class Name setting in the Property inspector
By default, mx.screens.Form is the class assigned to
form objects and mx.screens.Slide is the class assigned
for slide objects. However, you can also extend (create a subclass
of) the Form or Slide class and assign your custom class using the
Property inspector.
Extending the core screen classes is recommended when you create a complex application or presentation where individual forms or slides require customized behavior or functionality.